package com.pine.app.module.security.oauth.provider;

import java.io.Serializable;
import java.util.Collection;
import java.util.Set;

/**
 * @author xiaoyuan
 * @create 2020/3/10
 **/
public interface OAuth2ClientRequest extends Serializable {

    String getClientId();

    String getClientSecret();

    String getClientName();

    /**
     * @Description: 是否有授权范围
     * @Param:
     * @return:
     * @Author: xyjxust
     * @Date: 2019/9/5
     */
    boolean isScoped();
    /**
     * @Description: 获取授权范围
     * @Param:
     * @return:
     * @Author: xyjxust
     * @Date: 2019/9/5
     */

    Set<String> getScope();

    /**
     * @Description: 获取授权类型集合
     * @Param:
     * @return:
     * @Author: xyjxust
     * @Date: 2019/9/5
     */

    Set<String> getResources();
    /**
     * @Description: 获取授权类型
     * @Param:
     * @return:
     * @Author: xyjxust
     * @Date: 2019/9/5
     */
    String getGrantType();
    /**
     * @Description: 获取授权角色编码集合
     * @Param:
     * @return:
     * @Author: xyjxust
     * @Date: 2019/9/5
     */
    Collection<String> getRoles();

     Integer getAccessTokenValiditySeconds();

     Integer getRefreshTokenValiditySeconds();
}
